password = input('请输入密码(回车结束):')
yw = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
sz = '0123456789'

flag_yw = 0
flag_sz = 0
flag_if = 0

length = len(password)
for i in range(length):
    if password[i] in yw:
        flag_yw = 1
        continue
    elif password[i] in sz:
        flag_sz = 1
        continue
    else:
        print('输入不符合要求，不能构成密码')
        flag_if = 1
        break

while flag_if == 0:
    if (length <= 8) and (flag_yw + flag_sz == 2):
        print('%s是低强度密码' % password)
        break
    elif (length > 8) and (flag_yw + flag_sz == 2):
        print('%s是高强度密码' % password)
        break
    else:
        pass
